<div>
    <div style="margin-bottom: 20px;">
        <span style="font-size: 30px">简单查询</span>
    </div>

    <div class="query">查询条件</div>


    <div class="textboxes">
    <div class="form-inline group-margin">
        <label>匹配查询:</label>
        <input kendo-auto-complete ng-trim="true" ng-model="param.key" class="myinput" style="width: 50%"/>
    </div>
    <div class="form-inline group-margin">
        <div class="form-group">
            <label>索引:</label>
            <select kendo-drop-down-list ng-model="param.priority" class="myinput" >
                <option value="logstash-*">logstash-*</option>
                <option value="logstash-*-svcsql-*">logstash-*-svcsql-*</option>
                <option value="logstash-*-comm-*">logstash-*-comm-*</option>
                <option value="logstash-*-idk-*">logstash-*-idk-*</option>
                <option value="logstash-*-midware-*">logstash-*-midware-*</option>
                <option value="logstash-*-epes-*">logstash-*-epes-*</option>
            </select>
        </div>
        <div class="form-group" ng-if="isQuickQuery">
            <label>起始时间:</label>
            <input kendo-date-time-picker k-format="'yyyy-MM-dd HH:mm:ss'" k-ng-model="param.startTime"/>
        </div>
        <div class="form-group" ng-if="!isQuickQuery">
            <label>起始时间:</label>
            <input type="number" kendo-auto-complete ng-model="param.dateValue"
                   style="width: 70px;"/>
            <!--<select kendo-drop-down-list ng-model="param.dateType" style="width: 135px;">-->
            <!--<option value="second">秒钟之前</option>-->
            <!--<option value="minute">分钟之前</option>-->
            <!--<option value="hour">小时之前</option>-->
            <!--<option value="day">天之前</option>-->
            <!--<option value="week">周之前</option>-->
            <!--<option value="month">月之前</option>-->
            <!--<option value="year">年之前</option>-->
            <!--</select>-->
        </div>
        <div class="form-group" ng-if="isQuickQuery">
            <label>结束时间:</label>
            <input kendo-date-time-picker k-format="'yyyy-MM-dd HH:mm:ss'" k-ng-model="param.endTime"/>
        </div>
        <div class="form-group" ng-if="!isQuickQuery">
            <label>结束时间:</label>
            <input kendo-date-time-picker readonly="true" value="Now"/>
        </div>
        <kendo-button class="k-primary" ng-click="query()" style="float: right">查询</kendo-button>
    </div>
    </div>


</div>


<div style="width:100%;"  ng-if="queryEcharts == 1" >
    <div class="query"></div>
    <div style="height:300px" echarts="option"></div>
</div>
<div class="result">结果集</div>
<div class="row">
    <div class="col-md-2" style="text-align: left;padding-left: 30px;">
        <div style="margin-bottom: 5px" class="row" >
            <div class="fields">Selected Fields</div>
            <span ng-repeat=" sel in selected ">
            <div class="available" ng-mouseenter="showDel=true" ng-mouseleave="showDel=false">
                <span >{{sel}}</span>
                <span class="button" ng-if="showDel" ng-click="removeSelected($index,sel)" style="">remove</span>
            </div>
                </span>
        </div>
        <div class="row">
            <div class="fields">Available Fields</div>
            <span ng-repeat=" avail in available ">
               <div  class="available" ng-mouseenter="showAdd=true" ng-mouseleave="showAdd=false">
                       <span>{{avail}}</span>
                       <span class="button addButton" ng-if="showAdd" ng-click="addSelected($index,avail)" >add</span>
               </div>

            </span>
        </div>
    </div>
    <div class="col-md-10" class="table-responsive" >

        <div kendo-tooltip k-options="toolTipOptions">
            <div kendo-grid="ELKGrid"
                 k-options="ELKGridOptions"
                 k-columns="columns"
                 k-rebind="columns"
          >
                <div k-detail-template>
                    <ul class="list-group">
                        <span ng-repeat=" lGroup in listGroup">
                             <li class="list-group-item" >{{lGroup}}:{{dataItem["_source"][lGroup]}}</li>
                        </span>
                    </ul>
                </div>
            </div>
        </div>
    </div>


</div>


